package com.example.demo.lucene;

public class Field {
    private String name; //字段名称
    private String value;//字段值
    private Type type;//字段类型


    public Field(String name,String value,Type type) {
        this.name=name;
        this.value=value;
        this.type=type;
    }


    public String getName() {
        return name;
    }



    public void setName(String name) {
        this.name = name;
    }


    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public Type getType() {
        return type;
    }



    public void setType(Type type) {
        this.type = type;
    }


    @Override
    public String toString() {
        String s="name:"+name+"\n"
                +"value:"+value+"\n"
                +"type:"+type+"\n";

        return s;
    }



    /**
     * Key  主键：且必为long类型
     * String  不需要分词、  需要索引、  需要存储
     * Text
     * Stored 只需存储
     * Double
     * Long
     * Integer
     */
    public enum Type{
        Key,
        String,
        Text,
        Stored,
        Double,
        Long,
        Integer,
//        Time

    }
}
